package cn.w.outdoor.lib.common;

public abstract class TimeCountDownUnit {

    private int waitTimeLimit;

    private boolean stopCountDown = false;

    public boolean isStopCountDown() {
        return stopCountDown;
    }

    public void stopCountDown() {
        this.stopCountDown = true;
    }

    public int getWaitTimeLimit() {
        return waitTimeLimit;
    }

    public void setWaitTimeLimit(int waitTimeLimit) {
        this.waitTimeLimit = waitTimeLimit;
    }

    /**
     * 事件触发方法
     * <p>
     * 返回 false 的将会被移除出触发队列
     * 剩余事件为 0 时，也会被移除出队列
     *
     * @param timeLimit 剩余事件
     */
    public abstract void action(int timeLimit);

}
